﻿using Bookvar.ObjectModel;

namespace Bookvar.ServiceModel
{
    /// <summary>
    /// This service provides functionality to change the view of the mind map. This includes zooming, 
    /// centering topics, etc.
    /// </summary>
    public interface IViewService
    {
        /// <summary>
        /// Gets or sets the zoom. The zoom values are relative to 1. This means that if you need 50% zoom set it to 0.5 
        /// and if you need 200% zoom use 2.
        /// </summary>
        /// <value>The zoom value relative to 1. For example for 50% use 0.5 and for 200% use 2.0</value>
        double Zoom
        { 
            get; 
            set;
        }

        /// <summary>
        /// Moves the mind map view so the selected topic is in the center of the map.
        /// The movement is instant - no animation is used.
        /// </summary>
        /// <param name="topic">The topic to center.</param>
        void CenterTopic( Topic topic );

        /// <summary>
        /// Moves the mind map view so the selected topic is in the center of the map.
        /// Depending on the <paramref name="useAnimation"/> parameter the movement is
        /// instant or slick (using an animation).
        /// </summary>
        /// <param name="topic">The topic to center.</param>
        /// <param name="useAnimation">if set to <c>true</c> the movement of the view will use a slick animation.</param>
        void CenterTopic( Topic topic, bool useAnimation );

        void InitializeDragBehavior();

        bool IsDragging
        { 
            get;
        }
    }
}
